Skip to main content

Full text of "Arduino"

Circle-A-Sketch 



I 



Make Projects 



build, hack, tweak, share, discover,' 



Circle-A-Sketch 



Written By: Taylor 



O PARTS: 

Arduino microcontroller (1) 
CdS Photoresistor (1) 
Potentiometer. 100kQ (2) 
Jumper wires (1) 
1 0K Resistor (1) 



SUMMARY 

This simple project uses an Arduino, a photoresistor, 2 potentiometers, and a resistor and 
uses basic serial communication between the Arduino and your computer. 

Basically, the user can draw by controlling two potentiometers (drawing knobs) and the 
photoresistor determines how dark the circle will be drawn. 



© Make Projects www.makeprojects.com Page 1 of 3 



Circle-A-Sketch 






............. 



.............. 



f ■ t r M> nr jMi ■ ri in run Lin raj pi 
———— —— |i iriini ftiru fi iiiiiiii 

?j : j j :: jTT 

a _,■ ■ I ..Jtl iiuj I.. . .1... 

. I . | . . . . | ..».■ . . . ,,«]... 




Set up two potentiometers next to each other. They will act as the horizontal and vertical 
controls for the Processing Circle-A-Sketch. 

• The pin on one end will go to a 5V source, the middle pin will go to an analog pin on the 
Arduino (either AO or A1) and the other end pin will go to ground ("Gnd"). 

Photoresistor 

• Create a voltage divider with the 10k resistor. 




<j Arduino Filt Edit Sketch Tools Help 



A '" N <*i 



tm ©© Situ [SB 



O * ^ HB 



lir^trtr-duino I Arduino Wit 




Connect the Arduino to your 
computer. 

Verify/Compile the code and then 
upload it to the Arduino board. 



© Make Projects 



www.makeprojects.com 



Page 2 of 3 



Circle-A-S ketch 





• Download and install Processing. 

• Open Processing and upload the 
Processing code. 

• Click the Run button and get ready 
to sketch! 




firstArduino 



'-..O- 



firjtArdi f^ *v 



Circle-A-3 

:< -icr end 

lay 26 281 




firstArduino I Processing 1,2.1 



Modified f 
David A. H 
Casey Reus 

http ://prc 

+■,■■ 

import pro 

r L rat xWn 
r loat yVtiL 
f loat tone 
boo Leon pr 

Serial nyP< 

void -setup 

{ 
//crtot 

Sise(59@ 
smwth() 

print In ( 
■yPfcrt J 
syPort.b 



void drawd 



{ 




. . fill based on the photoresistor "s input 
ft LLfteneValue}; 



Draw and experiment, 



This document was last generated on 201 2-1 0-31 1 0:21 :29 AM. 



© Make Projects 



www.makeprojects.com 



Page 3 of 3